﻿<?php

// Generation contenu du tableau de la facture
$rows = "";
$total = 0;
foreach($this->res as $l) {
	$rows .= "<tr><td>".$l['f_titre']."</td><td>".$l['loc_deb']."</td><td>"
           . $l['loc_fin']."</td><td>".$l['loc_montant']." €</td></tr>\n";
    $total += $l['loc_montant'];
}

if($rows!=""){
    $content = "<table><tr><th>Film loué</th><th>Loué le </th>"
             . "<th>Rendu le</th><th>Montant</th></tr>\n";
    $content .= $rows;
    $content .= "</table>";
}


?>


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr">
<head>
	<title><?php echo $this->title; ?></title>
	<meta http-equiv="Content-type" content="text/html; charset=UTF-8" />
	<!--<link rel="stylesheet" type="text/css" href="./style/formulaire.css" />-->
</head>
<body>
<h1><?php echo $this->title; ?></h1>

<?php echo $content; ?><br />
Total : <?php echo $total ?> € 

</body>
</html>
